<template>
    <div>
        <h1>路由演示</h1>
        <div>
            <button @click="nextPage">next</button>
            <button @click="lastPage">last</button>
        </div>
        <router-link to="/首页参数">首页</router-link>|
        <router-link to="/about/关于参数">关于</router-link>|
        <router-link to="/info">信息</router-link>
        <router-view></router-view>
    </div>
</template>
<script setup>
import router from "../router";

const nextPage = ()=>{
    router.push({
        name:"AboutView"
    })
}
const lastPage = ()=>{
    router.push({
        name:"MainView"
    })
}
</script>
<style scoped></style>